#ifndef TILESETOBJECT_HPP
#define TILESETOBJECT_HPP

#include <tinyxml.h>
#include <string>

namespace Tmx
{
  class Polygon;
  class Ellipse;
  class Polyline;
  class Properties;
  enum ObjectType {
	  normal, sprite, treasure
  };
  class Object {
  public:
    Object();
	~Object();
	void parse(TiXmlNode *objectNode);
	std::string getName() {return name;}
	std::string getType() {return type;}
	int getX() {return x;}
	int getY() {return y;}
	int getWidth() {return width;}
	int getHeight() {return height;}
	float getRotation() {return rotation;}
	int getGid() {return gid;}
	bool isVisible() {return visible;}
	bool isInteractable() {return interactable;}
	Polygon *getPolygon() {return pPolygon;}
	Ellipse *getEllipse() {return pEllipse;}
	Polyline *getPolyline() {return pPolyline;}
	Properties *getProperties() {return properties;}
  private:
    std::string name;
	std::string type;
	int x;
	int y;
	int width;
	int height;
	float rotation;
	int gid;
	bool visible;
	bool interactable;
	Properties *properties;
	// object types:
	Polygon  *pPolygon;
	Ellipse  *pEllipse;
	Polyline *pPolyline;
  };
}; // namespace

#endif
